﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master" AutoEventWireup="true" CodeBehind="CustomerOrdered.aspx.cs" Inherits="PHTShop.admin.WebForm2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 
       
     <div id="title" class="b2">
         <h2  id="lblcustomerorder" runat="server" >List orders </h2>
         
    </div>
    <p></p>
<label id="lblmessage" runat="server"></label>
    <asp:ListView ID="lsvOrders" runat="server" 
        onitemupdated="lsvOrders_ItemUpdated" 
        onitemupdating="lsvOrders_ItemUpdating" 
        onselectedindexchanged="lsvOrders_SelectedIndexChanged" 
        onselectedindexchanging="lsvOrders_SelectedIndexChanging" 
         onpagepropertieschanging="lsvOrders_PagePropertiesChanging">
  
    <LayoutTemplate>
    <table width="100%">
    
        <tr>
            <th>Order</th>
            <th>Date creation</th>
            <th>Status</th>
            <th>Payment</th>
            <th>View</th>
        </tr>
        <tbody>
            <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
        </tbody>
    </table>
    </LayoutTemplate>
    <ItemTemplate>
        <tr>
       
        
        <td><span><%# Eval("name") %> </span>
            <asp:HiddenField ID="hdfOrderID" runat="server" Value='<%# Eval("ID") %>' />
        </td>
        
        
        <td><span><%#  Eval("datecreation") %> </span></td>
        
       
        <th>
            <asp:CheckBox ID="chkStatus" runat="server" Checked='<%# Eval("status") %>'/></th>
       
        <td><span><%# Eval("paymentmethod.name") %> </span></td>
        
        <td>
        <asp:LinkButton ID="lbtnView" runat="server" CommandName="select">Detail</asp:LinkButton>
        <asp:LinkButton ID="lbtnUpdate" runat="server" CommandName="update">Update</asp:LinkButton>
        </td>
        </tr> 
    </ItemTemplate>
        
    </asp:ListView>
    <div class="paginate">
    <%if (lsvOrders.DataSource != null)
      { %>
            <asp:DataPager ID="DataPager1" runat="server" PagedControlID="lsvOrders" PageSize="10">
                <Fields>
                    <asp:NextPreviousPagerField ShowFirstPageButton="true" ShowPreviousPageButton="true"
                        ButtonType="Link" ShowNextPageButton="false" ShowLastPageButton="false" />
                    <asp:NumericPagerField ButtonType="Link" />
                    <asp:NextPreviousPagerField ShowFirstPageButton="false" ButtonType="Link" ShowPreviousPageButton="false"
                        ShowNextPageButton="true" ShowLastPageButton="true" />
                </Fields>
            </asp:DataPager>
            <%} %>
        </div>
    <p>
    </p>
</asp:Content>
